package com.sprucetec.live.enums;

/**
 * @ClassName WatchTypeEnum
 * @Description:
 * @Author Kenny
 * @Date 2020/4/26
 **/
public enum WatchTypeEnum {
    VIDEO_DETAIL("videoDetail", "视频"),
    INTRANET_IP("intranetIp", "内网ip");
    public String type;

    public String desc;

    WatchTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String code2Desc(Integer type) {
        for (VideoTypeEnum status : VideoTypeEnum.values()) {
            if (status.getCode().equals(type)) {
                return status.getDesc();
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = type;
    }
}
